package com.huawei.cloud.phone.management.domain.connection.status;

import com.huawei.cloud.phone.management.domain.connection.Connection;
import com.huawei.cloud.phone.management.domain.connection.ConnectionStatus;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;

@Slf4j
@AllArgsConstructor
public class IdleState extends AbstractState {
    private final Connection connection;

    @Override
    public void connect() {
        log.error("{} abnormal connect msg.", connection.getPhoneId());
    }

    @Override
    public void disconnect() {
        log.error("{} abnormal disconnect msg.", connection.getPhoneId());
    }

    @Override
    public void heartNormal() {
        log.error("{} normal heart msg.", connection.getPhoneId());
    }

    @Override
    public void heartAbnormal() {
        log.debug("{} abnormal heart msg.", connection.getPhoneId());
    }

    @Override
    ConnectionStatus getCurrentStatus() {
        return ConnectionStatus.IDLE;
    }
}
